﻿# -*- coding: utf-8 -*-

class Cell:

    def __init__(self, material):
        self.__material = material
        self.__creatures = []

    def getMaterial(self):
        return self.__material

    def setMaterial(self, material):
        self.__material = material

    def addCreature(self, creature):
        self.__creatures.append(creature)

    def removeCreature(self, creature):
        self.__creatures.remove(creature)

    def getCreatures(self):
        return self.__creatures

    def getIcon(self):
        for c in self.__creatures:
            return c.getIcon()
        return self.__material.getIcon()
